Optimal. Leaf size=211 \[ -\frac{\left (6 a^2 b c e+12 a^2 c^2 d-12 a b^2 c d-a b^3 e+2 b^4 d\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^3 \left (b^2-4 a c\right )^{3/2}}-\frac{-a b e-6 a c d+2 b^2 d}{a^2 x \left (b^2-4 a c\right )}+\frac{(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3}-\frac{\log (x) (2 b d-a e)}{a^3}+\frac{c x (b d-2 a e)-a b e-2 a c d+b^2 d}{a x \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.35683, antiderivative size = 211, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.286, Rules used = {822, 800, 634, 618, 206, 628} \[ -\frac{\left (6 a^2 b c e+12 a^2 c^2 d-12 a b^2 c d-a b^3 e+2 b^4 d\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^3 \left (b^2-4 a c\right )^{3/2}}-\frac{-a b e-6 a c d+2 b^2 d}{a^2 x \left (b^2-4 a c\right )}+\frac{(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3}-\frac{\log (x) (2 b d-a e)}{a^3}+\frac{c x (b d-2 a e)-a b e-2 a c d+b^2 d}{a x \left (b^2-4 a c\right ) \left (a+b x+c x^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 822
Rule 800
Rule 634
Rule 618
Rule 206
Rule 628
Rubi steps
\begin{align*} \int \frac{d+e x}{x^2 \left (a+b x+c x^2\right )^2} \, dx &=\frac{b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac{\int \frac{-2 b^2 d+6 a c d+a b e-2 c (b d-2 a e) x}{x^2 \left (a+b x+c x^2\right )} \, dx}{a \left (b^2-4 a c\right )}\\ &=\frac{b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac{\int \left (\frac{-2 b^2 d+6 a c d+a b e}{a x^2}+\frac{\left (-b^2+4 a c\right ) (-2 b d+a e)}{a^2 x}+\frac{-2 b^4 d+10 a b^2 c d-6 a^2 c^2 d+a b^3 e-5 a^2 b c e-c \left (b^2-4 a c\right ) (2 b d-a e) x}{a^2 \left (a+b x+c x^2\right )}\right ) \, dx}{a \left (b^2-4 a c\right )}\\ &=-\frac{2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac{b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac{(2 b d-a e) \log (x)}{a^3}-\frac{\int \frac{-2 b^4 d+10 a b^2 c d-6 a^2 c^2 d+a b^3 e-5 a^2 b c e-c \left (b^2-4 a c\right ) (2 b d-a e) x}{a+b x+c x^2} \, dx}{a^3 \left (b^2-4 a c\right )}\\ &=-\frac{2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac{b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac{(2 b d-a e) \log (x)}{a^3}+\frac{(2 b d-a e) \int \frac{b+2 c x}{a+b x+c x^2} \, dx}{2 a^3}+\frac{\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \int \frac{1}{a+b x+c x^2} \, dx}{2 a^3 \left (b^2-4 a c\right )}\\ &=-\frac{2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac{b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac{(2 b d-a e) \log (x)}{a^3}+\frac{(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3}-\frac{\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \operatorname{Subst}\left (\int \frac{1}{b^2-4 a c-x^2} \, dx,x,b+2 c x\right )}{a^3 \left (b^2-4 a c\right )}\\ &=-\frac{2 b^2 d-6 a c d-a b e}{a^2 \left (b^2-4 a c\right ) x}+\frac{b^2 d-2 a c d-a b e+c (b d-2 a e) x}{a \left (b^2-4 a c\right ) x \left (a+b x+c x^2\right )}-\frac{\left (2 b^4 d-12 a b^2 c d+12 a^2 c^2 d-a b^3 e+6 a^2 b c e\right ) \tanh ^{-1}\left (\frac{b+2 c x}{\sqrt{b^2-4 a c}}\right )}{a^3 \left (b^2-4 a c\right )^{3/2}}-\frac{(2 b d-a e) \log (x)}{a^3}+\frac{(2 b d-a e) \log \left (a+b x+c x^2\right )}{2 a^3}\\ \end{align*}
Mathematica [A] time = 0.39363, size = 192, normalized size = 0.91 \[ \frac{-\frac{2 \left (6 a^2 b c e+12 a^2 c^2 d-12 a b^2 c d-a b^3 e+2 b^4 d\right ) \tan ^{-1}\left (\frac{b+2 c x}{\sqrt{4 a c-b^2}}\right )}{\left (4 a c-b^2\right )^{3/2}}-\frac{2 a \left (b^2 (c d x-a e)-a b c (3 d+e x)+2 a c (a e-c d x)+b^3 d\right )}{\left (b^2-4 a c\right ) (a+x (b+c x))}+(2 b d-a e) \log (a+x (b+c x))+2 \log (x) (a e-2 b d)-\frac{2 a d}{x}}{2 a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.016, size = 582, normalized size = 2.8 \begin{align*} -{\frac{d}{{a}^{2}x}}+{\frac{e\ln \left ( x \right ) }{{a}^{2}}}-2\,{\frac{\ln \left ( x \right ) bd}{{a}^{3}}}-{\frac{cxbe}{a \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}-2\,{\frac{{c}^{2}xd}{a \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{cx{b}^{2}d}{{a}^{2} \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}+2\,{\frac{ce}{ \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}-{\frac{{b}^{2}e}{a \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}-3\,{\frac{bcd}{a \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{{b}^{3}d}{{a}^{2} \left ( c{x}^{2}+bx+a \right ) \left ( 4\,ac-{b}^{2} \right ) }}-2\,{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) e}{a \left ( 4\,ac-{b}^{2} \right ) }}+{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{2}e}{2\,{a}^{2} \left ( 4\,ac-{b}^{2} \right ) }}+4\,{\frac{c\ln \left ( c{x}^{2}+bx+a \right ) bd}{{a}^{2} \left ( 4\,ac-{b}^{2} \right ) }}-{\frac{\ln \left ( c{x}^{2}+bx+a \right ){b}^{3}d}{{a}^{3} \left ( 4\,ac-{b}^{2} \right ) }}-6\,{\frac{bce}{a \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-12\,{\frac{{c}^{2}d}{a \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }+{\frac{{b}^{3}e}{{a}^{2}}\arctan \left ({(2\,cx+b){\frac{1}{\sqrt{4\,ac-{b}^{2}}}}} \right ) \left ( 4\,ac-{b}^{2} \right ) ^{-{\frac{3}{2}}}}+12\,{\frac{{b}^{2}cd}{{a}^{2} \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) }-2\,{\frac{{b}^{4}d}{{a}^{3} \left ( 4\,ac-{b}^{2} \right ) ^{3/2}}\arctan \left ({\frac{2\,cx+b}{\sqrt{4\,ac-{b}^{2}}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 9.43124, size = 3335, normalized size = 15.81 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.29282, size = 331, normalized size = 1.57 \begin{align*} \frac{{\left (2 \, b^{4} d - 12 \, a b^{2} c d + 12 \, a^{2} c^{2} d - a b^{3} e + 6 \, a^{2} b c e\right )} \arctan \left (\frac{2 \, c x + b}{\sqrt{-b^{2} + 4 \, a c}}\right )}{{\left (a^{3} b^{2} - 4 \, a^{4} c\right )} \sqrt{-b^{2} + 4 \, a c}} - \frac{2 \, b^{2} c d x^{2} - 6 \, a c^{2} d x^{2} - a b c x^{2} e + 2 \, b^{3} d x - 7 \, a b c d x - a b^{2} x e + 2 \, a^{2} c x e + a b^{2} d - 4 \, a^{2} c d}{{\left (a^{2} b^{2} - 4 \, a^{3} c\right )}{\left (c x^{3} + b x^{2} + a x\right )}} + \frac{{\left (2 \, b d - a e\right )} \log \left (c x^{2} + b x + a\right )}{2 \, a^{3}} - \frac{{\left (2 \, b d - a e\right )} \log \left ({\left | x \right |}\right )}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]